package com.caisejingyu.whales;


import com.caisejingyu.whales.common.BaseApplication;
import com.caisejingyu.whales.common.NetworkEnvironment;
import com.caisejingyu.whales.common.utils.SharedPreferenceUtil;
import com.caisejingyu.whales.home.common.Defines;
import com.caisejingyu.whales.home.vm.HomePresenter;
import com.caisejingyu.whales.smartrotob.main.MainApp;


public class XApplication extends MainApp {
    @Override
    public void onCreate() {
        super.onCreate();
    }
    
    @Override
    protected void onInit() {
        SetAppEnv(NetworkEnvironment.ENV_PRE);
        String machineCode = SharedPreferenceUtil.getString(
                SharedPreferenceUtil.getSharePreferences(BaseApplication.getAppContext(), Defines.WHALES_SP),
                Defines.MACHINE_CODE, null);
        if (machineCode == null) {
            new HomePresenter(this).machineInit();
        }
    }
}
